﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using WorldSource.Entities;

namespace WorldSource.GUI
{
    public class Button : GUIObject
    {
        String text;
        Texture2D texture;

        public Button(String text, Texture2D texture)
        {
            this.text = text;
            this.texture = texture;
        }
        public override void Update()
        {
            base.Update();
        }

        public override void Draw()
        {
            Game1.spriteBatch.Draw(texture, area, Color.White);
            Game1.spriteBatch.DrawString(spriteFont, text, new Vector2(area.Center.X - (spriteFont.MeasureString(text).X / 2), area.Center.Y - (spriteFont.MeasureString(text).Y) / 2), Color.White);
        }
    }
}
